/* ImportPlainFileAction.java
 * Author: liuex
 * 2007-12-20 ����12:50:31
 *
 * Note: 
 */
package lex.proxyverfier.actions;

import java.io.BufferedReader;
import java.util.List;

import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;

import org.lex.net.proxy.ProxyServer;
import org.lex.net.proxy.ProxyServerUtils;


public class ImportPlainFileAction extends BaseImportAction
{
	public ImportPlainFileAction()
	{
		super();
		this.setName( "Plain file..." );
	}

	@Override
	protected FileFilter getFileFilter()
	{
		return new FileNameExtensionFilter( "Plain text file", "txt" );
	}

	@Override
	protected List<ProxyServer> importProxyServers( BufferedReader in ) throws Exception
	{
		return ProxyServerUtils.importPlain( in );
	}
}
